import aiohttp,asyncio,aiofiles

urls = ["https://haowallpaper.com/link/common/file/getCroppingImg/17202184696024448"
        ,"https://haowallpaper.com/link/common/file/getCroppingImg/16615269514268032"]

# 请记住今天的这次函数定义 async def
async def download(url):
    async with aiohttp.ClientSession() as cs:
        async with cs.get(url) as r0:      # 就是个（requests）get 吧！！！
            name = url.split('/')[-1]

            # with open(r"D:\wps\success_image\{0}.jpg".format(name),"wb") as immm:
            #     immm.write(await r0.content.read())
            #     print(f"{name}.jpg 图片下载完成>_<")
            """ with 语句 哼 我不要了！！！"""

            async with aiofiles.open(r"D:\wps\success_image\{0}.jpg".format(name)
                    ,"wb") as immm:
                await immm.write(await r0.content.read())
                print(f"{name}.jpg 图片下载完成>_<")

async def main():
    tasks = []
    for i in urls:
        tasks.append(asyncio.create_task(download(i)))

    await asyncio.wait(tasks)
# 以上所有东西全是固定语法

if __name__ == '__main__':
    asyncio.run(main())

